﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using YawetagDemo.Framework.Server.Data;
using YawetagLib.System.Data;

namespace YawetagDemo.Framework.Server.Services
{
    [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IWCFMusicServiceCallbacks))]
    public interface IWCFMusicService
    {
        [OperationContract] WCFArtist GetArtist(int artistID);
        [OperationContract] IList<WCFArtist> GetArtists();
        [OperationContract] WCFArtist CreateArtist(string name, DateTime? dob);
        [OperationContract] WCFArtist UpdateArtist(int artistID, string name, DateTime? dob);
        [OperationContract] void DeleteArtist(int artistID);

        [OperationContract] WCFBand GetBand(int bandID);
        [OperationContract] IList<WCFBand> GetBands();
        [OperationContract] WCFBand CreateBand(string name);
        [OperationContract] WCFBand UpdateBand(int bandID, string name);
        [OperationContract] void DeleteBand(int bandID);
        [OperationContract] void AddArtistToBand(int bandID, int artistID);
        [OperationContract] void RemoveArtistFromBand(int bandID, int artistID);

        [OperationContract] WCFAlbum GetAlbum(int albumID);
        [OperationContract] WCFAlbum CreateAlbum(int bandID, string name, DateTime releaseDate);
        [OperationContract] WCFAlbum UpdateAlbum(int albumID, string name, DateTime releaseDate);
        [OperationContract] void RankAlbum(int albumID, int personID, byte stars);
        [OperationContract] void DeleteAlbum(int albumID);

        [OperationContract] void LogArtists();

        [OperationContract] PagedResultInfo<WCFAlbumRankingItem> GetAlbumRankingItems(string filterCriteria, string sortExpression,
            int startRowIndex, int? maximumRows);
    }
}
